﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace Wedo.Domain.Models
{
    public class Entity //: EntityKey
    {
        public Entity()
        {
            Id = Guid.NewGuid();
            Created = DateTime.Now;
            Modified = DateTime.Now;
            CreatedBy = System.Web.HttpContext.Current.User.Identity.Name;
            ModifiedBy = System.Web.HttpContext.Current.User.Identity.Name;
        }

        [Key]
        public virtual Guid Id { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [DisplayName( "创建时间")]
        public virtual DateTime Created { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [DisplayName( "修改时间")]
        public virtual DateTime Modified { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [DisplayName( "创建人")]
        public virtual string CreatedBy { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [DisplayName( "修改人")]
        public virtual string ModifiedBy { get; set; }
    }
}
